﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _5.PropertyChanged
{
    class Program
    {
        static void Main(string[] args)
        {
            Person p = new Person();

            p.PropertyChanged += new PropertyChangedEventHandler(p_PropertyChanged);

            p.FirstName = "peso";
            p.FirstName = "pesho";
            p.FirstName = "pesho";

            p.LastName = "Marcheff";
            p.LastName = "Marchev";
        }

        static void p_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            Console.WriteLine("{0} - from {1} to {2}", e.PropertyName, e.OldValue, e.NewValue);
        }
    }
}

